package org.sy.lab.多线程基础._2_同步._2_ReentrantLock._1_创建锁;

import java.util.concurrent.TimeUnit;

public class Main {

	public static void main(String[] args) {
		
		Tick tick = new Tick();
		
		MyThread myThread = new MyThread(tick);
		
		for (int i = 0; i < 10; i++) {
			Thread thread = new Thread(myThread);
			thread.start();
		}
		
		try {
			TimeUnit.SECONDS.sleep(1);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(tick.getNum());
	}
}
